package com.xinsoft.entity.po;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 告警数据
 * @TableName cus_warn_data
 */
@Data
public class CusWarnData implements Serializable {
    /**
     * 告警数据ID
     */
    private Integer id;

    /**
     * 设备表ID
     */
    private Integer deviceId;

    /**
     * 设备名称
     */
    private String deviceName;

    /**
     * 测点表ID
     */
    private Integer testPointId;

    /**
     * 测点名称
     */
    private String testPointName;

    /**
     * 预警规则ID
     */
    private Integer warnRuleId;

    /**
     * 预警名称
     */
    private String ruleName;

    /**
     * 测点数据
     */
    private String testPointValue;

    /**
     * 预警标准值
     */
    private String ruleValue;

    /**
     * 预警标准下限
     */
    private BigDecimal ruleMin;

    /**
     * 预警标准上限
     */
    private BigDecimal ruleMax;

    /**
     * 通知内容
     */
    private String noticeContext;

    /**
     * 阅读状态 0-未读  1-已读
     */
    private Integer doRead;

    /**
     * 创建人ID
     */
    private Integer createBy;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新人ID
     */
    private Integer updateBy;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 是否删除 0-否 1-是
     */
    private Integer doDelete;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CusWarnData other = (CusWarnData) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDeviceId() == null ? other.getDeviceId() == null : this.getDeviceId().equals(other.getDeviceId()))
            && (this.getDeviceName() == null ? other.getDeviceName() == null : this.getDeviceName().equals(other.getDeviceName()))
            && (this.getTestPointId() == null ? other.getTestPointId() == null : this.getTestPointId().equals(other.getTestPointId()))
            && (this.getTestPointName() == null ? other.getTestPointName() == null : this.getTestPointName().equals(other.getTestPointName()))
            && (this.getWarnRuleId() == null ? other.getWarnRuleId() == null : this.getWarnRuleId().equals(other.getWarnRuleId()))
            && (this.getRuleName() == null ? other.getRuleName() == null : this.getRuleName().equals(other.getRuleName()))
            && (this.getTestPointValue() == null ? other.getTestPointValue() == null : this.getTestPointValue().equals(other.getTestPointValue()))
            && (this.getRuleValue() == null ? other.getRuleValue() == null : this.getRuleValue().equals(other.getRuleValue()))
            && (this.getRuleMin() == null ? other.getRuleMin() == null : this.getRuleMin().equals(other.getRuleMin()))
            && (this.getRuleMax() == null ? other.getRuleMax() == null : this.getRuleMax().equals(other.getRuleMax()))
            && (this.getNoticeContext() == null ? other.getNoticeContext() == null : this.getNoticeContext().equals(other.getNoticeContext()))
            && (this.getDoRead() == null ? other.getDoRead() == null : this.getDoRead().equals(other.getDoRead()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getDoDelete() == null ? other.getDoDelete() == null : this.getDoDelete().equals(other.getDoDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode());
        result = prime * result + ((getDeviceName() == null) ? 0 : getDeviceName().hashCode());
        result = prime * result + ((getTestPointId() == null) ? 0 : getTestPointId().hashCode());
        result = prime * result + ((getTestPointName() == null) ? 0 : getTestPointName().hashCode());
        result = prime * result + ((getWarnRuleId() == null) ? 0 : getWarnRuleId().hashCode());
        result = prime * result + ((getRuleName() == null) ? 0 : getRuleName().hashCode());
        result = prime * result + ((getTestPointValue() == null) ? 0 : getTestPointValue().hashCode());
        result = prime * result + ((getRuleValue() == null) ? 0 : getRuleValue().hashCode());
        result = prime * result + ((getRuleMin() == null) ? 0 : getRuleMin().hashCode());
        result = prime * result + ((getRuleMax() == null) ? 0 : getRuleMax().hashCode());
        result = prime * result + ((getNoticeContext() == null) ? 0 : getNoticeContext().hashCode());
        result = prime * result + ((getDoRead() == null) ? 0 : getDoRead().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getDoDelete() == null) ? 0 : getDoDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", deviceId=").append(deviceId);
        sb.append(", deviceName=").append(deviceName);
        sb.append(", testPointId=").append(testPointId);
        sb.append(", testPointName=").append(testPointName);
        sb.append(", warnRuleId=").append(warnRuleId);
        sb.append(", ruleName=").append(ruleName);
        sb.append(", testPointValue=").append(testPointValue);
        sb.append(", ruleValue=").append(ruleValue);
        sb.append(", ruleMin=").append(ruleMin);
        sb.append(", ruleMax=").append(ruleMax);
        sb.append(", noticeContext=").append(noticeContext);
        sb.append(", doRead=").append(doRead);
        sb.append(", createBy=").append(createBy);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", doDelete=").append(doDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}